package com.wkbb.common.enums;

/**
 * @author luowenyan
 * @version V1.0
 * @className PublishSourceModuleEnum
 * @description TODO
 * @date 2019/9/1 12:14
 */
public enum PublishSourceModuleEnum {

    //发布源头（1：宝宝成长点滴 2：宝宝纪念日  3：班级圈 ）
    /**
     * 宝宝成长点滴
     */
    BABY_GROWTH(1,"宝宝成长"),
    /**
     * 宝宝纪念日
     */
    BABY_MEMORIAL_DAY(2,"宝宝纪念日"),
    /**
     * 班级圈
     */
    CLASS_CIRCLE(3,"班级圈"),
    /**
     * 考勤
     */
    ATTEND(5,"考勤"),
    /**
     * 校园
     */
    RECIPE(6,"宝贝食谱");

    private PublishSourceModuleEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (PublishSourceModuleEnum publishSourceModule : PublishSourceModuleEnum.values()) {
            if (publishSourceModule.getValue().intValue()==value) {
                return publishSourceModule.getDesc();
            }
        }
        return null;
    }
}
